UNPKG

react-garden

Version:

React + TypeScript + ThreeJS app using Material UI on NextJS, Apollo Client, GraphQL + WordPress REST APIs, for ThreeD web development.. a part of the threed.ai code family.

38 lines (29 loc) 808 B
// ** Third Party Imports import axios from 'axios' // ** Demo Components Imports import UserViewPage from '~/views/apps/user/view/UserViewPage' const UserView = ({ id, invoiceData }) => { return <UserViewPage id={id} invoiceData={invoiceData} /> } export const getStaticPaths = async () => { const res = await axios.get('/apps/users/list') const userDate = await res.data.allData const paths = userDate.map(item => ({ params: { id: `${item.id}` } })) return { paths, fallback: false } } export const getStaticProps = async ({ params }) => { const res = await axios.get('/apps/invoice/invoices') const invoiceData = res.data.allData return { props: { invoiceData, id: params?.id } } } export default UserView